package space.enemy;

import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.sprite.AnimatedSprite;
import org.anddev.andengine.opengl.texture.region.TiledTextureRegion;


import android.hardware.SensorManager;

public class Shuttle extends AnimatedSprite{
	
	
	
	private int life;
	
	private SensorManager sensorManager;
	
	public Shuttle(final float pX, final float pY, final TiledTextureRegion pTextureRegion, final int pLife,Scene scene) {
		super(pX, pY, pTextureRegion);
		this.life = pLife;
		//this.animate(new long[] { 100, 100,100,100,100, 100,100,100,100, 100,100,100 }, 1, 12, true);
		this.animate(new long[] { 100, 100 }, 0, 1, true);

		scene.getLastChild().attachChild(this);

	}
	public boolean isAlive(){
		 if (life <= 0)
	            return false;
	        else
	            return true;
	}
	
	 public void setLife(final int pAmount) {
	        life = pAmount;
	    }

	

}
